from myelin.Ns import \
    MYELIN, FOAF, \
    DC, DCTERMS

from myelin.rdf.bindery.ObjectTypes import LiteralTypeO

from Resource import Resource

from ObjectTypes import \
    AgentAccountTypeO, AgentAccountTypeS, \
    AgentTypeO, \
    UserAgentTypeO, \
    GroupAgentTypeO

from mappings import \
    AgentMap, AgentAccountMap

class AgentAccount(Resource):
    
    ModelTypes = (AgentAccountTypeO, AgentAccountTypeS)
    
    RDF_BINDINGS = {
        'mAccount_Owner'    : ((MYELIN, 'account-owner'), AgentTypeO, AgentAccountMap),
        'mAccount_Issuer'   : ((MYELIN, 'account-issuer'), GroupAgentTypeO, AgentAccountMap),
        'mTag'              : ((MYELIN, 'tag'), LiteralTypeO, AgentAccountMap),
        
        'dcCreator'         : ((DC, 'creator'), UserAgentTypeO, AgentAccountMap),
        'dcCreated'         : ((DC, 'created'), LiteralTypeO, AgentAccountMap),
        'dctermsModified'   : ((DCTERMS, 'modified'), LiteralTypeO, AgentAccountMap),
    }

    
CLASS_TYPES = {
    MYELIN + 'AgentAccount' : AgentAccount,
}